package com.li.utils;

import java.util.List;

public class Person {
    private Integer id;
    private Integer personId;
    /**
     * 第几代人
     */
    private Integer orderNum;
    /**
     * 姓名
     */
    private String name;

    /**
     * 下一代
     */
    private List<Person> sonList;


    public Person(Integer id, Integer personId, Integer orderNum, String name) {
        this.id = id;
        this.personId = personId;
        this.orderNum = orderNum;
        this.name = name;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getPersonId() {
        return personId;
    }

    public void setPersonId(Integer personId) {
        this.personId = personId;
    }

    public Integer getOrderNum() {
        return orderNum;
    }

    public void setOrderNum(Integer orderNum) {
        this.orderNum = orderNum;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<Person> getSonList() {
        return sonList;
    }

    public void setSonList(List<Person> sonList) {
        this.sonList = sonList;
    }

    @Override
    public String toString() {
        return "Person{" +
                "id=" + id +
                ", orderNum=" + orderNum +
                ", name='" + name + '\'' +
                ", sonList=" + sonList +
                '}';
    }
}
